#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>

void reverse(char* left, char* right)
{
	while (left < right)
	{
		char tem = *left;
		*left = *right;
		*right = tem;
		left++;
		right--;
	}
}
void left_move(char arr[], int k)
{
	int len = strlen(arr);
	k %= len;
	reverse(arr, &arr[k-1]);
	reverse(&arr[k], &arr[len-1]);
	reverse(arr, &arr[len-1]);

}

int main()
{
	char arr[] = { "abcdef" };
	int k = 8;
	left_move(arr, k);
	printf("%s", arr);
}